package io.renren.modules.wap.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.commons.dynamic.datasource.annotation.DataSource;
import io.renren.modules.wap.dao.SubscribeOrdersDao;
import io.renren.modules.wap.dto.SubscribeOrdersDTO;
import io.renren.modules.wap.entity.SubscribeOrdersEntity;
import io.renren.modules.wap.service.SubscribeOrdersService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 权益订阅
 *
 * @author Liang Pei 
 * @since 1.0.0 2025-01-02
 */
@Service
@DataSource("wap")
public class SubscribeOrdersServiceImpl extends CrudServiceImpl<SubscribeOrdersDao, SubscribeOrdersEntity, SubscribeOrdersDTO> implements SubscribeOrdersService {

    @Override
    public QueryWrapper<SubscribeOrdersEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<SubscribeOrdersEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}